import { _decorator, Asset, Component, Node } from 'cc';
const { ccclass, property } = _decorator;

export interface BundleInfo<T extends Asset =Asset>{
    bundleType: new ()=>T,
    name:string,
    urls:string[]
}

export interface BundleInfoMap{
    [key:string]:BundleInfo
}

//AB的接口信息。
//直接去创建出配置文件BundleInfoMap的对象 不要放到这个脚本










//数据的公共属性接口。
export interface DataTable{
    id:number
}

//以后需要处理数据，具体的游戏相关可以创建一个接口脚本到时候再里面写具体数据接口继承这个
//GameInterface.ts
// export interface EnenyDt extends DataTable{
//     name:string,
//     ack:number,
//     hp:number
// }
export interface LevelDt extends DataTable{
    iconName:string,
    screenName:string,
    arrLevelDetails:LevelDetails[],
    propID:number[],
}

export interface LevelDetails{
    levelId:string,
    levelName:string,
    description:string,
    task:string[],
    requirements:any[],
    enemyID:number[],
}

export interface PropDt extends  DataTable{
   iconName :string,
   type:string,
   buffID:number[],   
}

//装备数据，技能数据，兵种数据，都要继承该接口
export interface PropertyDt extends DataTable{
    iconName:string,
    type:string,
    kind:string,
    name:string,
    description:string,
    requirement:number,
    ack:number,
    addAck:number
}
//技能
export interface PlayerSkillDt extends PropertyDt{
    cd:number,
    interval:number,
}
//装备数据
export interface EquipmentDt extends PropertyDt{
    hp:number,
    dfs:number,
}
//兵种数据
export interface ShiBingDt extends PropertyDt{
    prefabName:string,//预制体名字
    hp:number,
    dfs:number,
    speed:number,
    ackRange:number//攻击范围
    camp:string
}

//敌人兵种数据
export interface EnemyShiBingDt extends ShiBingDt{
    
}
export interface RoleDt extends DataTable{
    iconName:string,
    name:string,
    hp:number,
    ack:number,
    dfs:number,
    ackRange:number,
    prefabName:string,
    camp:string
}
export interface PlayerDt extends RoleDt{
    exp:number,

}
//敌人boss数据
export interface EnemyBossDt extends RoleDt{
    type:string,
    skillID:number[], 
    speed:number,
}




